<?php
/**
 * Created by PhpStorm.
 * User: 16020
 * Date: 2018/11/25
 * Time: 20:15
 */

namespace app\admin\validate;

use think\Validate;

class Item extends Validate
{
    protected $rule = [
        'title'      => 'require',
        'stime'      => 'require',
        'otime'      => 'require',
        'sale_id'    => 'require',
        'whole_id'   => 'require',
    ];

    protected $message = [
        'title'      => '{%title_val}',
        'stime'      => '{%stime_val}',
        'otime'      => '{%otime_val}',
        'sale_id'    => '{%sale_id_val}',
        'whole_id'   => '{%whole_id_val}',
    ];

    protected $scene = [
        'add'   => ['title', 'stime', 'otime', 'sale_id','whole_id'],
        'edit'  => ['title', 'stime','otime'],
        'status' => ['status'],
    ];
}